<?php

class Application_Form_Zone extends Zend_Form
{
    public function init()
    {
        $this->setName('Zone');

        $zone_id = new Zend_Form_Element_Hidden('zone_id');
        $zone_id->addFilter('Int');
                                          
        $width = new Zend_Form_Element_Text('width');
        $width->setLabel('Rộng')        
               				->addFilter('Int');
               
        $height = new Zend_Form_Element_Text('height');
        $height->setLabel('Cao')        
               				->addFilter('Int');
               				
        $name = new Zend_Form_Element_Text('name');
        $name->setLabel('Tên')
        		->setRequired(true)
               ->addFilter('StripTags')
               ->addFilter('StringTrim')
               ->addValidator('NotEmpty');
        					  
       $description = new Zend_Form_Element_Textarea('description');
       $description->setLabel('Mô Tả')
        		->setRequired(true)
               ->addFilter('StripTags')
               ->addFilter('StringTrim')
               ->addValidator('NotEmpty');
               
       $price = new Zend_Form_Element_Text('price');
       $price->setLabel('Giá')
        		->setRequired(true)
               ->addFilter('StripTags')
               ->addFilter('StringTrim')
               ->addValidator('NotEmpty');
                    					               
        $submit = new Zend_Form_Element_Submit('submit');
        $submit->setAttrib('id', 'submitbutton');
        
        $cancel = new Zend_Form_Element_Submit('cancel');
        $cancel->setAttrib('id', 'CancelButton');

        $this->addElements(array($zone_id, $width, $height, $name, $description , $price ,$submit,$cancel));
    }
}